package com.xjscrm.server.biz.mq.consumer;

import com.uzai.mobile.collect.api.dto.MicaTriggerDto;
import com.uzai.trace.TraceGenerate;
import com.uzai.trace.boot.autoconfiguration.TraceProperties;
import org.apache.commons.lang3.StringUtils;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.slf4j.MDC;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * 机器人消息消费基类
 *
 * @author liuqi
 * @date 2024年03月05日 10:37
 */
public abstract class BaseTriggerMqConsumer implements RocketMQListener<MicaTriggerDto> {

    @Autowired
    private TraceProperties traceProperties;

    @Override
    @TraceGenerate //注入消息id标签
    public void onMessage(MicaTriggerDto micaTriggerDto) {
        this.doMessageHandle(micaTriggerDto);
    }

    public abstract void doMessageHandle(MicaTriggerDto micaTriggerDto);

}
